Skip to content

Serialize Pulumi publish steps to avoid Inferno.Common build races#21

Merged
CamSoper merged 1 commit into
mainfrom
claude/focused-fermat-cqmw6d-deploy-fix
Jun 15, 2026
Merged

Serialize Pulumi publish steps to avoid Inferno.Common build races#21
CamSoper merged 1 commit into
mainfrom
claude/focused-fermat-cqmw6d-deploy-fix

Conversation

@CamSoper

Copy link
Copy Markdown
Owner

What & why

Fixes the Pulumi deploy failure during the publish step.

Inferno.Deploy/Program.cs created three LocalCommands — publish-api, publish-mqtt, publish-cli — with no dependency between them, so Pulumi ran the three dotnet publish commands in parallel. Every service references Inferno.Common (see serviceDeps), so the parallel publishes rebuilt Inferno.Common concurrently and collided on its obj/+bin/ outputs (MSBuild file locks), failing the deploy.

Change

Chain each publish command to the previous one via DependsOn, serializing them (publish-api → publish-mqtt → publish-cli) so only one dotnet publish touches the shared Inferno.Common build outputs at a time. Ordering only — no functional change, and downstream copy/restart dependencies are untouched.

Notes

Verification

  • dotnet build Inferno.Deploy/Inferno.Deploy.csproj → clean (0 warnings).
  • Real validation is the next pulumi up / pulumi preview completing the publish step without the file-lock error.

https://claude.ai/code/session_01T8v7xa23G8v1GjsSFBwzme


Generated by Claude Code

The deploy created publish-api, publish-mqtt, and publish-cli with no
dependency between them, so Pulumi ran the three `dotnet publish` commands in
parallel. Every service references Inferno.Common, so the parallel publishes
rebuilt Common concurrently and collided on its obj/bin outputs (MSBuild file
locks), failing the deploy.

Chain each publish command to the previous one via DependsOn so only one
`dotnet publish` touches the shared Inferno.Common build outputs at a time.
Ordering only; no functional change.
@pulumi

pulumi Bot commented Jun 15, 2026

Copy link
Copy Markdown

🚀 The Update (preview) for CamSoper-org/inferno-deploy/main (at 4da77a4) was successful.

✨ Neo Code Review

This is a low-risk build-pipeline fix that serializes publish steps to avoid MSBuild concurrency issues; the replacements are expected and only cause the publish/restart commands to re-run, with no data loss. ✅ Low Risk

The PR serializes the dotnet publish steps so they run one at a time, preventing MSBuild file-lock collisions on the shared Inferno.Common outputs. The replacements are a side effect of adding DependsOn to the LocalCommand resources — changing resource options causes Pulumi to replace command:local:Command resources. The downstream restart-api and restart-mqtt remote commands are replaced because their triggers depend on the publish steps.

These are all ephemeral Command resources (no persistent state), so "replace" here just means the commands will re-execute. The services will restart on the Pi as part of the normal deploy flow.

Resource Changes

    Name          Type                    Operation
+-  restart-mqtt  command:remote:Command  replaced
+-  publish-mqtt  command:local:Command   replaced
+-  restart-api   command:remote:Command  replaced
+-  publish-api   command:local:Command   replaced
+-  publish-cli   command:local:Command   replaced

@CamSoper CamSoper marked this pull request as ready for review June 15, 2026 17:58
@CamSoper CamSoper merged commit f32ab2e into main Jun 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants